<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="Bookmark" href="favicon.ico" >
	<link rel="Shortcut Icon" href="favicon.ico" />
	<!--[if lt IE 9]>
	<script type="text/javascript" src="admin/lib/html5.js"></script>
	<script type="text/javascript" src="admin/lib/respond.min.js"></script>
	<![endif]-->
	<link rel="stylesheet" type="text/css" href="admin/static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="admin/lib/Hui-iconfont/1.0.9/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="admin/static/business/css/style.css" />
	<!--[if IE 6]>
	<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
	<script>DD_belatedPNG.fix('*');</script><![endif]-->
	<!--/meta 作为公共模版分离出去-->
	<title>基本设置</title>
	<meta name="keywords" content="h-ui.admin.pro v1.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
	<meta name="description" content="h-ui.admin.pro v1.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<div class="wap-container">
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en" style="float: none">&gt;</span> 管理员管理
		<span class="c-gray en" style="float: none">&gt;</span> 系统设定
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<article class="Hui-admin-content clearfix">
		<div class="panel">
			<div class="panel-body">
				<form class="form form-horizontal" id="configFormInfo">
					<div class="row clearfix">
						<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否展示排行榜：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<div class="radio-box">
								<input type="radio" id="is_show_rank_yes" name="is_show_rank" value="1" checked>
								<label for="is_show_rank_yes">展示</label>
							</div>
							<div class="radio-box">
								<input type="radio" id="is_show_rank_no" name="is_show_rank" value="0">
								<label for="is_show_rank_no">不展示</label>
							</div>
						</div>
					</div>
					<div class="row clearfix">
						<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否计算精准税额：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<div class="radio-box">
								<input type="radio" id="is_precise_tax_yes" name="is_precise_tax" value="1" checked>
								<label for="is_precise_tax_yes">税额 = 价税合计 /（1+税点）* 税点</label>
							</div>
							<div class="radio-box">
								<input type="radio" id="is_precise_tax_no" name="is_precise_tax" value="0">
								<label for="is_precise_tax_no">税额 = 价税合计 * 税点</label>
							</div>
						</div>
					</div>
					<div class="row clearfix">
						<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>主管查看信息权限：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<div class="radio-box">
								<input type="radio" id="is_supervisor_all_yes" name="is_supervisor_all" value="0" checked>
								<label for="is_supervisor_all_yes">本人及下属员工</label>
							</div>
							<div class="radio-box">
								<input type="radio" id="is_supervisor_all_no" name="is_supervisor_all" value="1">
								<label for="is_supervisor_all_no">公司所有员工</label>
							</div>
						</div>
					</div>
					<div class="row clearfix">
						<label for="customer_valid_day" class="form-label col-xs-4 col-sm-2">客户授权有效天数：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<input type="number" id="customer_valid_day" name="customer_valid_day" value="60" class="input-text">
						</div>
					</div>
					<div class="row clearfix">
						<label for="max_login_failed_number" class="form-label col-xs-4 col-sm-2">登录失败最大次数：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<input type="text" id="max_login_failed_number" name="max_login_failed_number" value="5" class="input-text">
						</div>
					</div>
					<div class="row clearfix">
						<label for="ip_white_list" class="form-label col-xs-4 col-sm-2">允许访问后台的IP列表：</label>
						<div class="form-controls col-xs-8 col-sm-9">
							<textarea id="ip_white_list" name="ip_white_list" class="textarea"></textarea>
						</div>
					</div>
					<div class="row clearfix">
						<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
							<a onClick="saveConfig()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i> 保存</a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</article>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="admin/lib/layer/3.1.1/layer.js"></script>
<script type="text/javascript" src="admin/static/h-ui/js/H-ui.min.js"></script>
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="admin/static/business/js/main.js"></script>
<script>document.write('<script type="text/javascript" src="admin/js/common.js?v='+ Date.now() +'"><\/script>');</script>
<script>document.write('<script type="text/javascript" src="admin/js/formatter.js?v='+ Date.now() +'"><\/script>');</script>
<script type="text/javascript">
	$(function() {
		getSysConfig();
	});

	//获取系统配置
	function getSysConfig() {
		ajaxGetFun("config/getSysConfig", {}, function (bizData) {
			for (var config of bizData) {
				switch (config.configText) {
					case "is_show_rank": {
						$("input[name='is_show_rank'][value="+ config.configValue +"]").attr("checked",true);
						break;
					}
					case "is_precise_tax": {
						$("input[name='is_precise_tax'][value="+ config.configValue +"]").attr("checked",true);
						break;
					}
					case "is_supervisor_all": {
						$("input[name='is_supervisor_all'][value="+ config.configValue +"]").attr("checked",true);
						break;
					}
					case "customer_valid_day": {
						$("#customer_valid_day").val(config.configValue);
						break;
					}
					case "max_login_failed_number": {
						$("#max_login_failed_number").val(config.configValue);
						break;
					}
					case "ip_white_list": {
						$("#ip_white_list").val(config.configValue);
						break;
					}
				}
			}
		}, null, "获取系统配置信息")
	}

	//保存配置
	function saveConfig() {
		ajaxPostFun("config/saveConfig", getFormJson($("#configFormInfo")), function (bizData) {
			showSuccessMsg("保存成功");
			getSysConfig();
		}, null, "保存系统配置信息");
	}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
